package com.sui.bigdata.rtcadmin.service;


import com.sui.bigdata.rtcadmin.exception.SparkApplicationException;
import com.sui.bigdata.rtcadmin.model.dto.SparkAppDto;
import com.sui.bigdata.rtcadmin.model.vo.CommonResponse;

/**
 * @Author: TingWuHuang
 * @Date: 2020/5/6 15:30
 * @description
 */
public interface SparkAppService {

    /**
     * Spark任务的操作
     * @param action    操作类型包括：submit,restart,stop,status
     * @param sparkApp 自定义参数对象
     * @return
     * @throws SparkApplicationException
     */
    CommonResponse action(String action, SparkAppDto sparkApp) throws SparkApplicationException;

    /**
     * 重启Spark任务
     * @param sparkApp
     * @return
     * @throws SparkApplicationException
     */
    SparkAppDto applicationRestart(SparkAppDto sparkApp) throws SparkApplicationException;

}
